Welcome![Sign In][Sign Up]
Location:
Search - mfc bmp

Search list

[Graph Recognize车牌识别

Description:


需要注意的地方:

使用VC++6.0做开发工具, 采用简单的SDI框架结构 ,一次处理一幅位图(有兴趣的可以作成MDI)

1)位图信息的数据是从左下往右下为一行,一行一行往上排的。

2)每行像素应该是4的倍数,不足的地方用空点补齐,读的时候注意跳过冗余点。

3)主要数据都存在Doc里面,BMP的主要数据存在一个由ImgData指向的BYTE型的内存空间(根据位图的大小,动态分配的)。

4)数据读进来以后,注意向内存中贴图,以保证刷新的效率。

5)程序执行流程

应用程序生成--》打开--》CDipView的OnFileOpen 函数--》

调用CDipDoc的FileOpen 函数--》并使用myDoc->UpdateAllViews(NULL); 刷新

自动调用CDipView的OnPaint函数--》调用CDipView的OnDraw函数----一个像素点一个像素点的画

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

比较重要的地方

读BMP文件,只能打开256色   (可以是灰度)

显示和内存贴图技术

关于调色板: 调色板实际上是一个数组,4个BYTE 分别是 B,G,R,和 Reserved
每一个像素点都有一个相应的数组。


关于VC和windows 的绘图机制:
使用GDI(图形设备接口)对象,通常使用CDC 类,CPaintDC也一样(device-context)设备上下文

windows下的MFC编程机制,消息驱动,事件等待!

全局的app(应用程序对象)

注意 手工分配内存的清除 和CDC对象的删除 以释放系统的GDI资源
每一个new操作符都要对应一个delete

虽然已经弄出来了,还是希望大家好好读读源程序。

你们以后的工作:

在菜单中添加菜单项,通过ClassWizzard 生成消息响应函数(当然也可手动添加),
所有的操作应当是对 BYTE* ImgData;进行的。
在完成相应的功能后 将 isnewfile 和 isnewiamge 置为真 ,并使用myDoc->UpdateAllViews(NULL); 刷新

当然,可以更加有个性化一点,有能力的同学可以自己完成。
随着课程的进行,菜单功能逐渐丰富,最后完成基本的数字图像处理的功能,而不必最后一下完成一个大的作业。

 

 


Platform: | Size: 295054 | Author: tata80808 | Hits:

[OpenGL program二维图像三维显示

Description: 本人为了图像处理的需要,很想实现二维图像的三维显示,于是写了本代码,希望与此有兴趣的读者共享。图像的获取一是bmp图像文件,二是来自剪贴板。本代码在MFC中调用OpenGL库函数来实现二维图像的三维显示,图像的宽度、高度和象素的亮度分别为三维空间的x,z,y坐标。程序主要有初始化、绘图、资源释放和操作部分,这些功能在OGL_MFCView.cpp文件中实现。OpenGL库的初始化在该文件中的OnCreate,InitScene和DrawScene函数中实现,主要初始化OpenGL运行时的环境变量,三维物体的光照,材质等,由于介绍OpenGL库的初始化的文档很多,在这里我就不多说了,感兴趣的读者可以参考有关的文档。在DrawScene函数中调用全局函数GLDraw3DBMP完成绘图部分。 编译源代码时,必须把opengl32.lib glu32.lib链到工程中。 可以通过对话框改变材质。按上下箭头键可以实现三维图像的绕x轴旋转,按左右箭头键可以实现三维图像绕z轴旋转。 本代码在Windows2000下编译通过。-image processing to the needs and would like to achieve th ree-dimensional two-dimensional images, then wrote the code, with the readers are interested in sharing. Image Access First bmp image files, two from the clipboard. The MFC code Calling OpenGL library functions to achieve the three-dimensional two-dimensional image display, image width, height and pixel brightness of the three-dimensional space x, z, y coordinates. Main initialization procedures, mapping, the release of resources and operation, the function of these documents OGL_MFCView.cpp achieve. OpenGL library initialization of the documents, the OnCreate, InitScene DrawScene function and the realization of the main initialization OpenGL runtime environment variables, 3D objects light, material, and as such introduced OpenG
Platform: | Size: 106574 | Author: 张立强 | Hits:

[GDI-Bitmapmfc-open-BMP-picture

Description: 数字图像处理- MFC教程 第一课 建立MFC和打开bmp图片-Digital Image Processing- MFC Tutorial Lesson establish MFC and open bmp picture
Platform: | Size: 2338816 | Author: 李传俊 | Hits:

[Graph programbmp

Description: 用MFC实现用户界面同时浏览多幅图片的功能-MFC picture browsing
Platform: | Size: 49152 | Author: 要权 | Hits:

[Compress-Decompress algrithmsbmp-jpeg--mfc

Description: BMP实现JPEG格式的图像压缩程序设计 代码-BMP implementation of JPEG image compression application design code
Platform: | Size: 106496 | Author: 黄家驹 | Hits:

[Special EffectsLImage

Description: MFC BMP位图打开保存附加位图灰度直方图的获取-MFC BMP bitmap open the saved additional access bitmap histogram
Platform: | Size: 2116608 | Author: xiaohui | Hits:

[Special Effectsvcbianhuan

Description: vc 6.0+mfc bmp图片的读取显示+几何变换 可执行-vc 6.0 bmp image read geometric transformations
Platform: | Size: 439296 | Author: lee | Hits:

[VC/MFCMFC_BMP_CREAT

Description: 基于VS2012的MFC——BMP图像生成接口函数, 只要有相应的图像数据,就可以生成一个BMP图像-Based on the MFC VS2012- BMP image generation interface function, As long as there is the corresponding image data, you can generate a BMP image
Platform: | Size: 157696 | Author: 雨昂 | Hits:

[Program docVC-for-bmp-open

Description: 介绍如何使用MFC打开一幅bmp位图,里面涉及到了具体步骤,可以按要求来做-Describes how to use MFC to open a bmp bitmap, which relates to the specific steps that can be done on request
Platform: | Size: 332800 | Author: 佀洁 | Hits:

[VC/MFCbitmap-BMP

Description: BMP位图类的创建与MFC单文档视图类的显示-Create a bitmap BMP class with MFC single document view class display
Platform: | Size: 208896 | Author: jik_un | Hits:

[Special EffectsMFC-read-bmp

Description: MFC读取bmp图片,让你很清楚的理解bmp文件的结构和组成,欢迎使用-MFC read bmp images, so you clearly understand the structure and composition of bmp files, Welcome
Platform: | Size: 5532672 | Author: 葛忠孝 | Hits:

[Picture ViewerShow-a-BMP

Description: 利用MFC显示一张位图,对于初学者来说比较适用-Display a bitmap using MFC, more suitable for beginners
Platform: | Size: 2273280 | Author: 陈婕 | Hits:

[Special Effectsshiyan

Description: VC MFC bmp 灰度变换 直方图等
Platform: | Size: 2543616 | Author: 影子 | Hits:

[Picture ViewercPP-show-bmp

Description: mfc打开bmp图片,并对其进行彩度转灰度,亮度调整,对比度调整等功能。-mfc open bmp images to gray and its saturation, brightness adjustment, contrast adjustment and other functions.
Platform: | Size: 3917824 | Author: zhengnan | Hits:

[Special EffectsPiLiangZhuanHuan-BMP-toJPG

Description: VC++ MFC 运用GDI的批量图片转换,将批量的BMP转换为JPG-VC++ MFC 运用GDI的批量图片转换,将批量的BMP转换为JPG
Platform: | Size: 5437440 | Author: 叶伟杰 | Hits:

[Special Effectsimage

Description: VC6.0 MFC bmp格式的图片的打开与保存。-VC6.0 MFC bmp image opens and saves
Platform: | Size: 1857536 | Author: xjt | Hits:

[CSharpMFC

Description: (1)在工具栏中点击“打开”功能出现文件打开窗口,用户选择一幅bmp图片后在指定区域靠左显示该图片,若图片尺寸小于指定区域则按原始大小显示;若大于则按合适比例显示。 (2)在工具栏中依次实现附件2中的各项图像处理功能,每一个功能都是在上一次的操作基础上进行,工具栏中须具备“返回上一次操作”的功能,并且能够随时还原原图(请注意:有些图像处理功能对图片格式有要求,如灰度直方图均衡必须要求是灰度图,因此请考虑各功能之间的关系,添加必要的防御代码)。 (3)在工具栏中点击“保存”功能出现文件保存窗口,用户可以选择保存路径来保存当前图片处理结果。 (4)点击“关闭”功能,关闭当前图片,若操作结果尚未保存则必须弹出对话框提示用户进行保存。-(1) in the tool bar, click on Open function has the file open window, the user selects a bmp picture to the left to display the image in the designated area, if the image size is smaller than the specified area press the original size if more than press fit scale. (2) in the toolbar and then click the implementation of Annex 2 image processing functions, each function is carried out in the last operation, based on the tool bar must have to return to the previous operation function, and can at any time restore original (Note: Some image processing functions for image format is required, such as histogram equalization must ask is grayscale, so please consider the relationship between functions, add the necessary defense code). (3) in the tool bar, click on the Save function appears to save the file window, the user can choose to save the path to save the current image processing results. (4) Click Close function closes the current image, if the operation results are not yet s
Platform: | Size: 4625408 | Author: HBX | Hits:

[Software EngineeringBMP

Description: 详细介绍了BMP图像处理的原理,以及编程所需要的详细步骤,有利于我们加深对于MFC的使用。-Details of the BMP image processing principles, as well as detailed steps required for programming, help us to deepen the use of the MFC.
Platform: | Size: 1695744 | Author: xcwujie123 | Hits:

[Picture ViewerShow_JPG

Description: MFC程序显示JPG、BMP相关的图片,可自由展示(The MFC program displays pictures related to JPG and BMP)
Platform: | Size: 286720 | Author: berryliang | Hits:

[GUI DevelopVC 位图缩放与旋转

Description: 基于VC++6.0 MFC图像处理...包含图像平移、图形旋转、图像反转倒置镜像和图像缩放。(Based on VC++6.0 MFC image processing, including image translation, graphics rotation, image inversion, inverted image and image scaling.)
Platform: | Size: 1258496 | Author: Tercel_fly | Hits:
« 1 2 3 4 5 6 7 89 10 11 12 13 ... 22 »

CodeBus www.codebus.net